<link rel="stylesheet" type="text/css" href="css/aliceui.min.css">
<link rel="stylesheet" type="text/css" href="css/resetui.css"/>
<link rel="stylesheet" type="text/css" href="css/noticet.css"/>
<script type="text/javascript" src="js/Calendar.js"></script>
    <div class="r_content">
        <div class="oranclay">
            <form action="<?=$_SERVER['PHP_SELF']?>" method="get">
                <input value="<?=$_GET['t']?>" type="hidden" name="t"/>
                <b>选择任意时段：</b>
                <span><input type="text" class="intxt" name="bt" value="<?=$bt?>" onmouseup="SelectDate(this,'yyyy-MM-dd',0,0)" /></span>
                <span>到</span>
                <span><input type="text" class="intxt" name="et" value="<?=$et?>" onmouseup="SelectDate(this,'yyyy-MM-dd',0,0)" /></span>
                <a href="javascript:" data-time="w" class="time">最近七天</a>
                <a href="javascript:" data-time="m" class="time">本月</a>
                <button type="submit" class="inbtn">查询</button>
            </form>
        </div>
        <div class="logd">
            <table class="logtab">
                <tr>
                    <th>产品类型</th>
                    <th class="algin_L">产品标题</th>
                </tr>
                <?if(count($prod_list)>0){?>
                    <?foreach($prod_list as $prod){?>
                    <tr>
                        <td class="algin_C"><?=$ProdTypes[$prod['e']]?></td>
                        <td><a href="pi.html?<?=$prod['i']?>" target="_blank"><?=$prod['p'].$prod['t']?></a></td>
                    </tr>
                    <?}} else {?>
                    <tr>
                        <td class="algin_C" colspan="2">该时间段没有产品变更记录。</td>
                    </tr>
                <?}?>
            </table>
        </div>
    </div>
<script  type="text/javascript" src="js/moment.min.js"></script>
<script  type="text/javascript" src="js/d.js"></script>
<script type="text/javascript">
    var when = new when();
    jQuery(document).ready(function($){
        //日期获取
        $("a.time").click(function(){
            var d=$(this).attr('data-time'),
                t1 = $("input[name='bt']")[0],t2 = $("input[name='et']")[0];
            switch(d){
                case 'w':
                    t1.value=when.week()[0] ;
                    t2.value=when.week()[1] ;
                    break;
                case 'm':
                    t1.value=when.month()[0];
                    t2.value=when.month()[1];
                    break;
                default:break;
            }
        });
    });
</script>